package org.flown.shop.dao;



public interface BaseDAO<T>
{
    //SELECT * FROM ${table_name} where id=#{id} and name=#{name}...
    public T select(T entity);
    //SELECT * FROM ${table_name} where id=#{id}...
    public T selectByID(int id);
    //INSERT INTO ${table_name} (${column_name1}, ${column_name2}) values(#{},#{})
    public int insert(T entity);
    public boolean updateByID(T entity);
    public int delete(T entity);
    public int deleteByID(int id);


    /**
     * @param condition 例如id=5
    */
    public int count(String condition);
}


